<?php
include('../includes/common.php');
if ($islogin2 == 1) { } else exit("<script language='javascript'>window.location.href='./login.php';</script>");
?>

<?php
$title = '用户中心';
$active = 'index';
include('head.php');
$uid = $userrow['id'];
$qq = $userrow['qq'];
$rs = $conn->query("select * from dorm_list where uid='$uid'");
$dorm_num = $rs->num_rows;

$rs = $conn->query("select * from rmb_list where(uid='$uid')");
$rmb_num = $rs->num_rows;

?>
<section id="main-content">
    <section class="wrapper">
        <div class="row state-overview">
            <div class="col-lg-3 col-sm-6">
                <section class="panel">
                    <div class="symbol terques">
                        <i class="fa fa-eye"></i>
                    </div>
                    <div class="value">
                        <h1><?php echo $uid; ?></h1>
                        <p>MYUID</p>
                    </div>
                </section>
            </div>    
            <div class="col-lg-3 col-sm-6">
                <section class="panel">
                    <div class="symbol yellow">
                        <i class="fa fa-link"></i>
                    </div>
                    <div class="value">
                        <h1><?php echo $dorm_num; ?></h1>
                        <p>宿舍数量</p>
                    </div>
                </section>
            </div>
            <div class="col-lg-3 col-sm-6">
                <section class="panel">
                    <div class="symbol red">
                        <i class="fa fa-user"></i>
                    </div>
                    <div class="value">
                        <h1><?php echo $rmb_num; ?></h1>
                        <p>变动记录</p>
                    </div>
                </section>
            </div>
            <div class="col-lg-3 col-sm-6">
                <section class="panel">
                    <div class="symbol blue">
                        <i class="fa fa-location-arrow"></i>
                    </div>
                    <div class="value">
                        <h1><?php echo $qq; ?></h1>
                        <p>绑定QQ</p>
                    </div>
                </section>
            </div>
        </div>


        <div class="panel-group m-bot20" id="accordion">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
                            公告①
                        </a>
                    </h4>
                </div>
                <div id="collapseOne" class="panel-collapse collapse in">
                    <div class="panel-body">
                        <?php echo $conf['gg1']; ?>
                    </div>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">
                            公告②
                        </a>
                    </h4>
                </div>
                <div id="collapseTwo" class="panel-collapse collapse">
                    <div class="panel-body">
                        <?php echo $conf['gg2']; ?>
                    </div>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseThree">
                            公告③
                        </a>
                    </h4>
                </div>
                <div id="collapseThree" class="panel-collapse collapse">
                    <div class="panel-body">
                        <?php echo $conf['gg3']; ?>
                    </div>
                </div>
            </div>
        </div>
    </section>
</section>
<script src="../static/user/js/common-scripts.js"></script>